class_name GameInputEvents
extends Node

static var input_map: Dictionary = {
	"walk_left": Vector2.LEFT,
	"walk_right": Vector2.RIGHT,
	"walk_up": Vector2.UP,
	"walk_down": Vector2.DOWN
}

static func movement_input() -> Vector2:
	var direction : Vector2
	for action in input_map.keys():
		if Input.is_action_pressed(action):
			direction = input_map[action]
			break
		
	if direction == null:
		direction = Vector2.ZERO
		
	return direction

static func is_movement_input(direction) -> bool:
	return !direction == Vector2.ZERO

static func is_use_tool() -> bool:
	return Input.is_action_just_pressed("hit")
